﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="pragma" content="no-cache" />
	<meta http-equiv="expires" content="-1" />
	<link rel="stylesheet" type="text/css" href="/site_media/css/style.css" />
	<title>Labmin - dane administratora</title>
</head>
<body>
	<div id="wrap">
		{% include "header.html" %}
		{% if request.session.user %}
			<div id="content-wrap">
				{% include "sidebar.html" %}
				<div id="main">
					<div class="box">
                		<h1>Dane <span class="gray">administratora</span></h1>
					</div>
					<div class="box" style="padding: 10px;">
						<table>
							<tr>
								<th>login:</th>
								<td><b>{{ admin.login }}</b></td>
							</tr>
							<tr>
								<th>imię:</th>
								<td>{{ admin.first_name }}</td>
							</tr>
							<tr>
								<th>nazwisko:</th>
								<td>{{ admin.last_name }}</td>
							</tr>
							<tr>
								<th>e-mail:</th>
								<td>{{ admin.email }}</td>
							</tr>
							{% if admin.is_superadmin %}
							<tr>
								<td>Superadministrator</td>
							</tr>
							{% endif %}
							<tr>
								<th>grupy studentów:</th>
								<td><ul style="margin:0px; color:inherit;">
									{% for student_group in admin.student_groups.all %}
									<li>
									<a href="/show_student_group/{{student_group.pk}}">{{ student_group.name }}</a>
									</li>
									{% endfor %}
								</ul></td>
							</tr>
							<tr>
								<th>grupy usług:</th>
								<td><ul style="margin:0px; color:inherit;">
									{% for service_group in admin.service_groups.all %}
									<li>
									<a href="/show_service_group/{{service_group.pk}}">{{ service_group.name }}</a>
									</li>
									{% endfor %}
								</ul></td>
							</tr>
						</table>
					</div>
					<form action="" method="post" style="margin: 0px">
						<input type="hidden" name="admin_pk" value="{{ admin.pk }}" />
						<div class="box" style="padding: 10px;">
							<input class="button" type="button" value="Edytuj" onclick="window.location='/admin_form/{{admin.pk}}'" />
							<input class="button" type="button" value="Usuń" onclick="document.forms[0].action='/delete_admin'; document.forms[0].submit();" />
						</div>
					</form>
				</div>
			</div>
		{%endif%}
	</div>
	{% include "footer.html" %}
</body>
</html>
